class UserDetailEntity {
  String? background;
  String? expertId;
  String? userId;
  String? userLogo;
  String? userName;
  int? fansCnt;
  int? focusCnt;
  int? planCnt;
  int? subsCnt;
  List<String>? honors;
  String? introduction;
  int? isArticle;
  int? isBasket;
  int? isFocus;
  int? isFoot;
  int? isIdea;
  int? isPost;
  int? isVideo;
  int? likeCnt;
  int? isPlanList;
  List<LeagueTop>? leagueTop;
  List<TagItems>? tagItems;
  int? isIdeaExpert;
  int? isIdeaOpen;
  String? ideaContent;
  int? isInvite;

  UserDetailEntity(
      {this.background,
      this.expertId,
      this.userId,
      this.fansCnt,
      this.focusCnt,
      this.honors,
      this.introduction,
      this.isArticle,
      this.isBasket,
      this.isFocus,
      this.isFoot,
      this.isIdea,
      this.isPost,
      this.isVideo,
      this.isPlanList,
      this.likeCnt,
      this.planCnt,
      this.subsCnt,
      this.leagueTop,
      this.tagItems,
      this.userLogo,
      this.userName,
      this.isIdeaExpert,
      this.isIdeaOpen,
      this.ideaContent,
      this.isInvite});

  UserDetailEntity.fromJson(Map<String, dynamic> json) {
    background = json['background'];
    expertId = json['expertId'];
    userId = json['userId'];
    fansCnt = json['fansCnt'];
    focusCnt = json['focusCnt'];
    if (honors != null) {
      honors = json['honors'].cast<String>();
    }
    introduction = json['introduction'];
    isArticle = json['isArticle'];
    isBasket = json['isBasket'];
    isFocus = json['isFocus'];
    isFoot = json['isFoot'];
    isIdea = json['isIdea'];
    isPost = json['isPost'];
    isVideo = json['isVideo'];
    isPlanList = json['isPlanList'];
    likeCnt = json['likeCnt'];
    planCnt = json['planCnt'];
    subsCnt = json['subsCnt'];
    if (json['leagueTop'] != null) {
      leagueTop = <LeagueTop>[];
      json['leagueTop'].forEach((v) {
        leagueTop!.add(new LeagueTop.fromJson(v));
      });
    }
    if (json['tagItems'] != null) {
      tagItems = <TagItems>[];
      json['tagItems'].forEach((v) {
        tagItems!.add(new TagItems.fromJson(v));
      });
    }
    userLogo = json['userLogo'];
    userName = json['userName'];
    isIdeaExpert = json['isIdeaExpert'];
    isIdeaOpen = json['isIdeaOpen'];
    ideaContent = json['ideaContent'];
    isInvite = json['isInvite'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['background'] = this.background;
    data['expertId'] = this.expertId;
    data['userId'] = this.userId;
    data['fansCnt'] = this.fansCnt;
    data['focusCnt'] = this.focusCnt;
    data['honors'] = this.honors;
    data['introduction'] = this.introduction;
    data['isArticle'] = this.isArticle;
    data['isBasket'] = this.isBasket;
    data['isFocus'] = this.isFocus;
    data['isFoot'] = this.isFoot;
    data['isIdea'] = this.isIdea;
    data['isPost'] = this.isPost;
    data['isVideo'] = this.isVideo;
    data['isPlanList'] = this.isPlanList;
    data['likeCnt'] = this.likeCnt;
    data['planCnt'] = this.planCnt;
    data['subsCnt'] = this.subsCnt;
    if (this.tagItems != null) {
      data['tagItems'] = this.tagItems!.map((v) => v.toJson()).toList();
    }
    data['userLogo'] = this.userLogo;
    data['userName'] = this.userName;
    data['isIdeaExpert'] = this.isIdeaExpert;
    data['isIdeaOpen'] = this.isIdeaOpen;
    data['ideaContent'] = this.ideaContent;
    data['isInvite'] = this.isInvite;
    return data;
  }
}

class LeagueTop {
  String? content;
  String? hitRatio;
  int? leagueId;
  String? leagueName;
  String? leagueLogo;
  int? sportsId;

  LeagueTop(
      {this.content,
      this.hitRatio,
      this.leagueId,
      this.leagueName,
      this.leagueLogo,
      this.sportsId});

  LeagueTop.fromJson(Map<String, dynamic> json) {
    content = json['content'];
    hitRatio = json['hitRatio'];
    leagueId = json['leagueId'];
    leagueName = json['leagueName'];
    leagueLogo = json['leagueLogo'];
    sportsId = json['sportsId'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['content'] = this.content;
    data['hitRatio'] = this.hitRatio;
    data['leagueId'] = this.leagueId;
    data['leagueName'] = this.leagueName;
    data['leagueLogo'] = this.leagueLogo;
    data['sportsId'] = this.sportsId;
    return data;
  }
}

class TagItems {
  int? cnt;
  String? name;
  int? style;
  int? type;

  TagItems({this.cnt, this.name, this.style, this.type});

  TagItems.fromJson(Map<String, dynamic> json) {
    cnt = json['cnt'];
    name = json['name'];
    style = json['style'];
    type = json['type'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['cnt'] = this.cnt;
    data['name'] = this.name;
    data['style'] = this.style;
    data['type'] = this.type;
    return data;
  }
}

class ExpertLeagueItem {
  String? expertId;
  String? expertName;
  String? content;
  String? hitRatio;
  int? leagueId;
  String? leagueName;
  String? leagueLogo;
  int? sportsId;

  ExpertLeagueItem(
      {this.expertId,
      this.expertName,
      this.content,
      this.hitRatio,
      this.leagueId,
      this.leagueName,
      this.leagueLogo,
      this.sportsId});

  ExpertLeagueItem.from(UserDetailEntity? user, LeagueTop league) {
    expertId = user?.expertId;
    expertName = user?.userName;
    leagueId = league.leagueId;
    leagueName = league.leagueName;
    sportsId = league.sportsId;
    content = league.content;
    hitRatio = league.hitRatio;
    leagueLogo = league.leagueLogo;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['expertId'] = this.expertId;
    data['expertName'] = this.expertName;
    data['content'] = this.content;
    data['hitRatio'] = this.hitRatio;
    data['leagueId'] = this.leagueId;
    data['leagueName'] = this.leagueName;
    data['leagueLogo'] = this.leagueLogo;
    data['sportsId'] = this.sportsId;
    return data;
  }
}
